﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel.DomainServices.Server;
using System.ServiceModel.DomainServices.Hosting;

namespace Imtihan.Web
{
    public partial class ImtihanDomainService
    {
        /// <summary>
        /// Get assessment schedules by passing assessment id.
        /// </summary>
        /// <param name="assessmentId">assessment id.</param>
        /// <returns>list of assessment schedule.</returns>
        [Invoke]
        public List<AssessmentSchedule> GetAssessmentSchedulesByAssessmentId(Guid assessmentId)
        {
            return this.ObjectContext.AssessmentSchedules.Where(aSched => aSched.AssessmentId == assessmentId).ToList();
        }
    }
}